<a href="perfil.php?logout=1">Log out</a>

<?php
session_start();
session_name('pzLogin');
require_once ('./twitteroauth/twitteroauth.php');
require_once ('./twitteroauth/config.php');

if(isset($_GET['logout']) && $_GET['logout']==1){
	session_destroy();
	header('Location: index.php');
}else if (empty($_SESSION['access_token']) || empty($_SESSION['access_token']['oauth_token']) || empty($_SESSION['access_token']['oauth_token_secret'])) {
   session_destroy();
   header('Location: index.php');
}
/* Get user access tokens out of the session. */
$access_token = $_SESSION['access_token'];
/* Create a TwitterOauth object with consumer/user tokens. */
$twitterConnection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $access_token['oauth_token'], $access_token['oauth_token_secret']);
/* If method is set change API call made. Test is called by default. */
$twitterContent = $twitterConnection->get('account/verify_credentials');

var_dump ($twitterContent);
?>